import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("class_database", { schema: "alumni" })
export class ClassDatabase {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("varchar", { name: "name", length: 20 })
  name: string;

  @Column("varchar", { name: "school", length: 20 })
  school: string;

  @Column("int", { name: "level", default: () => "'0'" })
  level: number;

  @Column("year", { name: "biye_year", nullable: true, comment: "毕业年份" })
  biyeYear: number | null;
}
